#ifndef MSC_DEQUE_H
#define MSC_DEQUE_H

#include "list.h"

//c deque
typedef struct ms_list_item_s ms_deque_item_s;
typedef ms_list_item_t ms_deque_item_t;
typedef ms_list_item ms_deque_item;
typedef struct ms_list_s ms_deque_s;
typedef ms_list_t ms_deque_t;
typedef ms_list ms_deque;

CPUBLIC ms_deque ms_deque_create(ms_alloc_t* ac, size_t size, ms_list_funs* fs) {
    return ms_list_create(ac, size, fs);
}

CPUBLIC void ms_deque_clear(ms_deque d) {
    ms_list_clear(d);
}
CPUBLIC void ms_deque_destory(ms_deque d) {
    ms_list_destory(d);
}

CPUBLIC bool ms_deque_empty(ms_deque d) {
    return ms_list_empty(d);
}

CPUBLIC size_t ms_deque_size(ms_deque d) {
    return ms_list_size(d);
}

CPUBLIC bool ms_deque_push_front(ms_deque d, void* data) {
    return ms_list_push_front(d, data);
}

CPUBLIC bool ms_deque_push_back(ms_deque d, void* data) {
    return ms_list_push_back(d, data);
}

CPUBLIC void ms_deque_pop_front(ms_deque d) {
    return ms_list_pop_front(d);
}

CPUBLIC void ms_deque_pop_back(ms_deque d) {
    return ms_list_pop_back(d);
}

CPUBLIC void* ms_deque_front(ms_deque d) {
    return ms_list_front(d);
}

CPUBLIC void* ms_deque_back(ms_deque d) {
    return ms_list_back(d);
}
#endif // MSC_DEQUE_H
